<%@ page import="mr.zhang.dao.domain.MerchantProperty" %>
<%@ page import="mr.zhang.util.PageModelMerChantProperty" %>
<%@ page import="java.util.List" %>
<%@ page language="java"

	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>商家属性信息列表</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<%
		PageModelMerChantProperty pageModelMerChantProperty = (PageModelMerChantProperty) request
				.getAttribute("pageModelMerChantProperty");

		List<MerchantProperty> list = pageModelMerChantProperty.getList();
	%>
	<center>
		<font color="red" size="10">商家属性信息列表</font> <br> <br>
		<table width="820" border="1">
			<tr>
				<td width="100">ID</td>
				<td width="190">商家属性名称</td>
				<td width="190">所属商家</td>
				<td width="170">删除</td>
				<td width="170">更新</td>
			</tr>
			<%
				for (int i = 0; i < list.size(); i++) {

					MerchantProperty merchantProperty = list.get(i);
			%>

			<tr>
				<td><%=merchantProperty.getId()%></td>
				<td><%=merchantProperty.getProperty_name()%></td>
				<td><%=merchantProperty.getMerchant().getMerchant_name()%></td>

				<td><a
					href="deleteMerchantProperty.do?id=<%=merchantProperty.getId()%>">删除</a></td>
				<td><a href="updatepMerchantProperty.do?id=<%=merchantProperty.getId()%>">更新</a></td>
			</tr>
			<%
				}
			%>

		</table>
		<jsp:include page="merchantpropertypage.jsp"></jsp:include>
	</center>
</body>
</html>
